bitkeeper revision 1.1108.6.1 (40fcf6dbc9Be6szJlWRlS855NTQlrg)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 20 Jul 2004 10:41:31 +0000 (10:41 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 20 Jul 2004 10:41:31 +0000 (10:41 +0000)
Use the HYPERVISOR_block now, after adding a check if there's RCU work.

linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c
linux-2.6.7-xen-sparse/arch/xen/kernel/process.c

index 8883256b1998ddca3780960052f92f6c7e02d184..c6fa43f378cd64c013d93654a1f41c55e2b5f37e 100644 (file)
@@ -479,6 +479,7 @@ int set_timeout_timer(void)
 {
     u64 alarm = 0;
     int ret = 0;
+    int cpu = smp_processor_id();
 
     spin_lock(&timerlist_lock);
 
@@ -490,12 +491,6 @@ int set_timeout_timer(void)
      */
     alarm = __jiffies_to_st(next_timer_interrupt());
 
-#if 0
-    /* Tasks on the timer task queue expect to be executed on the next tick. */
-    if ( TQ_ACTIVE(tq_timer) )
-        alarm = __jiffies_to_st(jiffies + 1);
-#endif
-
     /* Failure is pretty bad, but we'd best soldier on. */
     if ( HYPERVISOR_set_timer_op(alarm) != 0 )
         ret = -1;
index c884a027576697ab6a637593d9c22106ba038c15..a9282773d6244a6185cfc014e5d294175ebc2aee 100644 (file)
 void xen_cpu_idle (void)
 {
        local_irq_disable();
-       if (need_resched()) {
+       if (need_resched() || !list_empty(&RCU_curlist(cpu)))
                local_irq_enable();
                return;
        }
-       if (0 && set_timeout_timer() == 0) {
+       if (set_timeout_timer() == 0) {
                /* NB. Blocking reenable events in a race-free manner. */
                HYPERVISOR_block();
                return;